package com.jp.knowledge.my.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author gzejia 978862664@qq.com
 */
public class ActiveDataModel implements Parcelable {

    public String mName;
    public int mIndex;
    public String mUnit;
    public int mIcon;
    public String value;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.mName);
        dest.writeInt(this.mIndex);
        dest.writeInt(this.mIcon);
        dest.writeString(this.mUnit);
        dest.writeString(this.value);
    }

    public ActiveDataModel() {
    }

    protected ActiveDataModel(Parcel in) {
        this.mName = in.readString();
        this.mIndex = in.readInt();
        this.mIcon = in.readInt();
        this.mUnit = in.readString();
        this.value=in.readString();
    }

    public static final Parcelable.Creator<ActiveDataModel> CREATOR = new Parcelable.Creator<ActiveDataModel>() {
        @Override
        public ActiveDataModel createFromParcel(Parcel source) {
            return new ActiveDataModel(source);
        }

        @Override
        public ActiveDataModel[] newArray(int size) {
            return new ActiveDataModel[size];
        }
    };
}
